Rules for integrands of the form (((g Tan[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Tan[e+f x]))^n)

X:  ∫(((g Tan[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Tan[e+f x]))^n)dx

Rule:

∫(((g Tan[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Tan[e+f x]))^n)dx  ⟶  ∫(((g Tan[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Tan[e+f x]))^n)dx

Program code:

Int[(g_.*tan[e_.+f_.*x_])^p_.*(a_+b_.*tan[e_.+f_.*x_])^m_*(c_+d_.*tan[e_.+f_.*x_])^n_,x_Symbol] :=
  Unintegrable[(g*Tan[e+f*x])^p*(a+b*Tan[e+f*x])^m*(c+d*Tan[e+f*x])^n,x] /;
FreeQ[{a,b,c,d,e,f,g,m,n,p},x]

Rules for integrands of the form (((g ((Tan[e+f x])^q)))^p) (((a+b Tan[e+f x]))^m) (((c+d Tan[e+f x]))^n)

1:  ∫(((g Cot[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Tan[e+f x]))^n)dx  when  p∉ℤ ∧ m∈ℤ ∧ n∈ℤ

Derivation: Algebraic normalization

Basis: If  m∈ℤ ∧ n∈ℤ, then (((a+b Tan[z]))^m) (((c+d Tan[z]))^n)==(((g^(m+n)) (((b+a Cot[z]))^m) (((d+c Cot[z]))^n))/(((g Cot[z]))^(m+n)))

Rule: If  p∉ℤ ∧ m∈ℤ ∧ n∈ℤ, then

∫(((g Cot[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Tan[e+f x]))^n)dx  ⟶  (g^(m+n))∫(((g Cot[e+f x]))^(p-m-n)) (((b+a Cot[e+f x]))^m) (((d+c Cot[e+f x]))^n)dx

Program code:

Int[(g_.*cot[e_.+f_.*x_])^p_*(a_.+b_.*tan[e_.+f_.*x_])^m_.*(c_+d_.*tan[e_.+f_.*x_])^n_.,x_Symbol] :=
  g^(m+n)*Int[(g*Cot[e+f*x])^(p-m-n)*(b+a*Cot[e+f*x])^m*(d+c*Cot[e+f*x])^n,x] /;
FreeQ[{a,b,c,d,e,f,g,p},x] && Not[IntegerQ[p]] && IntegerQ[m] && IntegerQ[n]

Int[(g_.*tan[e_.+f_.*x_])^p_*(a_.+b_.*cot[e_.+f_.*x_])^m_.*(c_+d_.*cot[e_.+f_.*x_])^n_.,x_Symbol] :=
  g^(m+n)*Int[(g*Tan[e+f*x])^(p-m-n)*(b+a*Tan[e+f*x])^m*(d+c*Tan[e+f*x])^n,x] /;
FreeQ[{a,b,c,d,e,f,g,p},x] && Not[IntegerQ[p]] && IntegerQ[m] && IntegerQ[n]

2:  ∫(((g ((Tan[e+f x])^q)))^p) (((a+b Tan[e+f x]))^m) (((c+d Tan[e+f x]))^n)dx  when  p∉ℤ ∧ ¬(m∈ℤ ∧ n∈ℤ)

Derivation: Piecewise constant extraction

Basis: (∂_x)((((g ((Tan[e+f x])^q)))^p)/(((g Tan[e+f x]))^(p q)))==0

Rule: If  p∉ℤ ∧ ¬(m∈ℤ ∧ n∈ℤ), then

∫(((g ((Tan[e+f x])^q)))^p) (((a+b Tan[e+f x]))^m) (((c+d Tan[e+f x]))^n)dx  ⟶  ((((g ((Tan[e+f x])^q)))^p)/(((g Tan[e+f x]))^(p q)))∫(((g Tan[e+f x]))^(p q)) (((a+b Tan[e+f x]))^m) (((c+d Tan[e+f x]))^n)dx

Program code:

Int[(g_.*tan[e_.+f_.*x_]^q_)^p_*(a_.+b_.*tan[e_.+f_.*x_])^m_.*(c_+d_.*tan[e_.+f_.*x_])^n_.,x_Symbol] :=
  (g*Tan[e+f*x]^q)^p/(g*Tan[e+f*x])^(p*q)*Int[(g*Tan[e+f*x])^(p*q)*(a+b*Tan[e+f*x])^m*(c+d*Tan[e+f*x])^n,x] /;
FreeQ[{a,b,c,d,e,f,g,m,n,p,q},x] && Not[IntegerQ[p]] && Not[IntegerQ[m] && IntegerQ[n]]

Rules for integrands of the form (((g Tan[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Cot[e+f x]))^n)

1:  ∫(((g Tan[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Cot[e+f x]))^n)dx  when n∈ℤ

Derivation: Algebraic normalization

Basis: c+d Cot[z]==((d+c Tan[z])/(Tan[z]))

Rule: If  n∈ℤ, then

∫(((g Tan[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Cot[e+f x]))^n)dx  ⟶  (g^n)∫(((g Tan[e+f x]))^(p-n)) (((a+b Tan[e+f x]))^m) (((d+c Tan[e+f x]))^n) dx

Program code:

Int[(g_.*tan[e_.+f_.*x_])^p_.*(a_+b_.*tan[e_.+f_.*x_])^m_.*(c_+d_.*cot[e_.+f_.*x_])^n_.,x_Symbol] :=
  g^n*Int[(g*Tan[e+f*x])^(p-n)*(a+b*Tan[e+f*x])^m*(d+c*Tan[e+f*x])^n,x] /;
FreeQ[{a,b,c,d,e,f,g,m,p},x] && IntegerQ[n]

2.  ∫(((g Tan[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Cot[e+f x]))^n)dx  when n∉ℤ

1.  ∫(((g Tan[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Cot[e+f x]))^n)dx  when n∉ℤ ∧ m∈ℤ

1:  ∫((Tan[e+f x])^p) (((a+b Tan[e+f x]))^m) (((c+d Cot[e+f x]))^n)dx  when n∉ℤ ∧ m∈ℤ ∧ p∈ℤ

Derivation: Algebraic normalization

Basis: a+b Tan[z]==((b+a Cot[z])/(Cot[z]))

Rule: If  n∉ℤ ∧ m∈ℤ ∧ p∈ℤ, then

∫((Tan[e+f x])^p) (((a+b Tan[e+f x]))^m) (((c+d Cot[e+f x]))^n)dx  ⟶  ∫(((((b+a Cot[e+f x]))^m) (((c+d Cot[e+f x]))^n))/((Cot[e+f x])^(m+p))) dx

Program code:

Int[tan[e_.+f_.*x_]^p_.*(a_+b_.*tan[e_.+f_.*x_])^m_.*(c_+d_.*cot[e_.+f_.*x_])^n_,x_Symbol] :=
  Int[(b+a*Cot[e+f*x])^m*(c+d*Cot[e+f*x])^n/Cot[e+f*x]^(m+p),x] /;
FreeQ[{a,b,c,d,e,f,n},x] && Not[IntegerQ[n]] && IntegerQ[m] && IntegerQ[p]

2:  ∫(((g Tan[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Cot[e+f x]))^n)dx  when n∉ℤ ∧ m∈ℤ ∧ p∉ℤ

Derivation: Algebraic normalization and piecewise constant extraction

Basis: a+b Tan[z]==((b+a Cot[z])/(Cot[z]))

Basis: (∂_x)(((Cot[e+f x])^p) (((g Tan[e+f x]))^p))==0

Rule: If  n∉ℤ ∧ m∈ℤ ∧ p∉ℤ, then

∫(((g Tan[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Cot[e+f x]))^n)dx  ⟶  ((Cot[e+f x])^p) (((g Tan[e+f x]))^p)∫(((((b+a Cot[e+f x]))^m) (((c+d Cot[e+f x]))^n))/((Cot[e+f x])^(m+p))) dx

Program code:

Int[(g_.*tan[e_.+f_.*x_])^p_*(a_+b_.*tan[e_.+f_.*x_])^m_.*(c_+d_.*cot[e_.+f_.*x_])^n_,x_Symbol] :=
  Cot[e+f*x]^p*(g*Tan[e+f*x])^p*Int[(b+a*Cot[e+f*x])^m*(c+d*Cot[e+f*x])^n/Cot[e+f*x]^(m+p),x] /;
FreeQ[{a,b,c,d,e,f,g,n,p},x] && Not[IntegerQ[n]] && IntegerQ[m] && Not[IntegerQ[p]]

2:  ∫(((g Tan[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Cot[e+f x]))^n)dx  when n∉ℤ ∧ m∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)(((((c+d Cot[e+f x]))^n) (((g Tan[e+f x]))^n))/(((d+c Tan[e+f x]))^n))==0

Rule: If  n∉ℤ ∧ m∉ℤ, then

∫(((g Tan[e+f x]))^p) (((a+b Tan[e+f x]))^m) (((c+d Cot[e+f x]))^n)dx  ⟶  
(((((g Tan[e+f x]))^n) (((c+d Cot[e+f x]))^n))/(((d+c Tan[e+f x]))^n))∫(((g Tan[e+f x]))^(p-n)) (((a+b Tan[e+f x]))^m) (((d+c Tan[e+f x]))^n) dx

Program code:

Int[(g_.*tan[e_.+f_.*x_])^p_.*(a_+b_.*tan[e_.+f_.*x_])^m_*(c_+d_.*cot[e_.+f_.*x_])^n_,x_Symbol] :=
  (g*Tan[e+f*x])^n*(c+d*Cot[e+f*x])^n/(d+c*Tan[e+f*x])^n*Int[(g*Tan[e+f*x])^(p-n)*(a+b*Tan[e+f*x])^m*(d+c*Tan[e+f*x])^n,x] /;
FreeQ[{a,b,c,d,e,f,g,m,n,p},x] && Not[IntegerQ[n]] && Not[IntegerQ[m]]